package com.cx.factoryMethod.api.impl;

import com.cx.common.restful.BaseResult;
import com.cx.factoryMethod.api.GiveAward;
import com.cx.factoryMethod.dto.Coupon;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author:cxy
 * @Date:2022/3/21 21:04
 */
public class CouponAwardImpl implements GiveAward {

    @Override
    public BaseResult<?> awardToUser() {
        System.out.println("-----------------CouponAwardImpl.awardToUser");
        return BaseResult.success(Coupon.builder()
                .couponId(1L)
                .couponName("c1")
                .couponPrice(new BigDecimal("1"))
                .createTime(new Date()));
    }
}
